package com.maykk.Demo01;

public class ExtendsTest {
    public static void main(String[] args) {
        Person person = new Person("小马", 18);
        person.eat();
        person.sleep();
        System.out.println(person.name + person.age + "岁");
        System.out.println("========================================");
        Teacher teacher = new Teacher(18, person.name, person.age);
        teacher.eat();
        teacher.sleep();
        teacher.teach();
        System.out.println(teacher.name + teacher.age + "岁");
    }
}
